home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / whdload / games / pushover.lha / Pushover / Install next >
Text File  |  1999-09-07  |  3KB  |  145 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "Readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. (set #program "WHDLoad")
  24. (P_chkrun)
  25.  
  26. ;****************************
  27.  
  28. (if
  29.   (exists #readme-file)
  30.   (if 
  31.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  32.     ("")
  33.     (run ("SYS:Utilities/More %s" #readme-file))
  34.   )
  35. )
  36.  
  37. (set @default-dest
  38.   (askdir
  39.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  40.     (help @askdir-help)
  41.     (default @default-dest)
  42.     (disk)
  43.   )
  44. )
  45. (set #dest (tackon @default-dest @app-name))
  46. (if
  47.   (exists #dest)
  48.   (
  49.     (set #choice
  50.       (askbool
  51.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  52.         (default 1)
  53.         (choices "Delete" "Skip")
  54.         (help @askbool-help)
  55.       )
  56.     )
  57.     (if
  58.       (= #choice 1)
  59.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  60.     )
  61.   )
  62. )
  63. (makedir #dest
  64.   (help @makedir-help)
  65.   (infos)
  66. )
  67.  
  68. ;----------------------------
  69.  
  70. (copyfiles
  71.   (help @copyfiles-help)
  72.   (source ("%s.slave" @app-name))
  73.   (dest #dest)
  74. )
  75. (copyfiles
  76.   (help @copyfiles-help)
  77.   (source ("%s.inf" @app-name ))
  78.   (newname ("%s.info" @app-name ))
  79.   (dest #dest)
  80. )
  81. (if
  82.   (exists #readme-file)
  83.   (
  84.     (copyfiles
  85.       (help @copyfiles-help)
  86.       (source #readme-file)
  87.       (dest #dest)
  88.     )
  89.     (copyfiles
  90.       (help @copyfiles-help)
  91.       (source ("%s.info" #readme-file))
  92.       (dest #dest)
  93.     )
  94.   )
  95. )
  96. (if
  97.   (= #sub-dir "")
  98.   ("")
  99.   (
  100.     (set #dest (tackon #dest #sub-dir))
  101.     (makedir #dest
  102.       (help @makedir-help)
  103.     )
  104.   )
  105. )
  106. (copyfiles
  107.   (help @copyfiles-help)
  108.   (source ("OSEMUMODULE400.BIN"))
  109.   (dest #dest)
  110. )
  111.  
  112. ;----------------------------
  113.  
  114. (working "Please insert your Pushover disk 1 in any drive.")
  115. (
  116.   (set #AD_disk "Pushover1")
  117.   (copyfiles
  118.     (help @copyfiles-help)
  119.     (source ("%s:" #AD_disk))
  120.     (dest #dest)
  121.     (pattern "~(c|devs|l|libs|s|#?.info)")
  122.   )
  123. )
  124.  
  125. (working "Please insert your Pushover disk 2 in any drive.")
  126. (
  127.   (set #AD_disk " ")
  128.   (copyfiles
  129.     (help @copyfiles-help)
  130.     (source ("%s:" #AD_disk))
  131.     (dest #dest)
  132.     (pattern "~(#?.info)")
  133.   )
  134. )
  135.  
  136. (if (< 0 (run ("xfddecrunch >nil: SOURCE \"%s/ant\" NA CLONE" #dest)))
  137.     (abort "XFD-Package not found!"))
  138.  
  139. ;----------------------------
  140.  
  141. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  142.  
  143. (exit)
  144.  
  145.